package com.houfukude;

import com.houfukude.Utils.SetFragmentView;
import com.houfukude.xtestmgr.R;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


/**
 * A placeholder fragment containing a simple view.
 */
public class PlaceholderFragment extends Fragment {
	/**
	 * The fragment argument representing the section number for this fragment.
	 */
	private static final String ARG_SECTION_NUMBER = "section_number";

	/**
	 * Returns a new instance of this fragment for the given section number.
	 */
	public static PlaceholderFragment newInstance(int sectionNumber) {
		PlaceholderFragment fragment = new PlaceholderFragment();
		Bundle args = new Bundle();
		args.putInt(ARG_SECTION_NUMBER, sectionNumber);
		fragment.setArguments(args);
		return fragment;
	}

	public PlaceholderFragment() {
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View rootView = null;
		switch (getArguments().getInt(ARG_SECTION_NUMBER)) {
		case 1:
			rootView = inflater.inflate(R.layout.fragment_file, container,
					false);

			// setFileButtons(rootView);
			SetFragmentView.setFtpClientView(rootView, getActivity());
			break;
		case 2:
			rootView = inflater.inflate(R.layout.fragment_note_list, container,
					false);

			//setNoteListView(rootView);
			SetFragmentView.setNoteListView(rootView, getActivity());
			
			break;
		case 3:
			rootView = inflater.inflate(R.layout.fragment_gundamview,
					container, false);
			break;
		default:
			rootView = inflater.inflate(R.layout.fragment_gundamview,
					container, false);
			break;
		}

		// TextView textView = (TextView) rootView
		// .findViewById(R.id.section_label);
		// textView.setText(Integer.toString(getArguments().getInt(
		// ARG_SECTION_NUMBER)));
		return rootView;
	}

	@Override
	public void onAttach(Activity activity) {
		super.onAttach(activity);
		// ((MainActivity)
		// activity).onSectionAttached(getArguments().getInt(
		// ARG_SECTION_NUMBER));
	}


}